from django.db import models


# Create your models here.
# CREATE TABLE `details` (
#   `id` int(11) NOT NULL AUTO_INCREMENT,
#   `update_time` datetime DEFAULT NULL COMMENT '数据最后更新时间',
#   `province` varchar(50) DEFAULT NULL COMMENT '省',
#   `city` varchar(50) DEFAULT NULL COMMENT '市',
#   `confirm` int(11) DEFAULT NULL COMMENT '累计确诊',
#   `confirm_add` int(11) DEFAULT NULL COMMENT '新增治愈',
#   `heal` int(11) DEFAULT NULL COMMENT '累计治愈',
#   `dead` int(11) DEFAULT NULL COMMENT '累计死亡',
#   PRIMARY KEY (`id`)
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
class Cov(models.Model):
    update_time = models.DateTimeField(verbose_name='数据最后更新时间')
    province = models.CharField(verbose_name='省', max_length=50)
    city = models.CharField(verbose_name='市', max_length=50)
    confirm = models.IntegerField(verbose_name='累计确诊')
    confirm_add = models.IntegerField(verbose_name='新增确诊')
    heal = models.IntegerField(verbose_name='累计治愈')

    class Meta:
        verbose_name_plural = '当前疫情信息表'

    def __str__(self):
        return self.city


class Knowledge(models.Model):
    title = models.CharField(verbose_name='标题', max_length=50)
    text = models.TextField(verbose_name='正文')
